package notify

import (
	"io/ioutil"
	"net/http"
)

type Notify struct {
	Url string
}

func NewNotify(url string) *Notify {
	obj := new(Notify)
	obj.Url = url
	return obj
}

func (n *Notify) DoNotify() error {
	resp, err := http.Get(n.Url + "aa")
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	_, err = ioutil.ReadAll(resp.Body)
	if err != nil {
		return err
	}
	return nil
}
